package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment("菜品属性表")
public class ProductSpuAttr extends AutoIdBase {
    @Comment("所属菜品")
    @ManyToOne
    private ProductSpu productSpu;

    @Comment("属性名称")
    private String attrName;

    public ProductSpuAttr(LocalDateTime createTime, ProductSpu productSpu, String attrName) {
        super(createTime);
        this.productSpu = productSpu;
        this.attrName = attrName;
    }
}
